import {createRouter, createWebHashHistory} from 'vue-router'


const routes = [
    {
        name: "Home",
        path: "/",
        component: () => import('../views/Home'),
        children: [


            { path:"/",component: () => import('../views/defult'),  },

            {
                path:"user/user",component: () => import('../views/User/user'),
            },
            {
                path:"user/bean",component: () => import('../views/User/bean'),
            },

            //活动
            { path: '/activity/temp', component: () => import('../views/Activity/Template')}, //活动模板
            { path: '/activity/list', component: () => import('../views/Activity/Activity')}, //活动列表

            //签到活动 /activity/signin/list
            { path: '/activity/signin/sign', component: () => import('../views/Sign/Sign')}, //活动列表
            { path: '/activity/signin/list', component: () => import('../views/Sign/List')}, //活动列表

            { path: '/gift/gift', component: () => import('../views/Gift/Gift')}, //礼品列表
           { path: '/gift/exchange', component: () => import('../views/Gift/exchange')}, //消费列表


            //系统
            { path: '/sys/system', component: () => import('../views/Sys/system')}, //系统配置
            { path: '/sys/link', component: () => import('../views/Sys/link')}, //系统配置

            { path: '/sys/chart/class', component: () => import('../views/Sys/chart/class')}, //图分类
            { path: '/sys/chart/list', component: () => import('../views/Sys/chart/list')}, //图列表

            { path: '/sys/news/class', component: () => import('../views/Sys/news/class')}, //新闻分类
            { path: '/sys/news/list', component: () => import('../views/Sys/news/list')}, //新闻分类

            { path: '/:pathMatch(.*)*', redirect: '/'}
        ]
    },
    {
        name: "Login",
        path: "/login",
        component: () => import('../views/Login'),
    },
    {path: '/:pathMatch(.*)*', redirect: '/'},
]


const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router
